//
//  Comman.swift
//  HFWeChat
//
//  Created by 黄来峰 on 16/4/17.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit

//新浪微博需要的参数
let APPKEY: String = "3596973820"
let REDIRECT_UTI: String = "https://www.baidu.com"
let APP_SECRET: String = "9e1b745cbf51128b2073f68d6de8fb11"

//切换控制器
let SWITCHDEFAULTVC: String = "SWITCHDEFAULTVC"


//定义一个全局的宽高
let kSCREENW = UIScreen.mainScreen().bounds.size.width
let kSCREENH = UIScreen.mainScreen().bounds.size.height

//设置主题颜色
let ThemeColor = UIColor.orangeColor()

//设置随机色
func RGB(red red: CGFloat,green: CGFloat,blue: CGFloat)->UIColor{
    return UIColor(red: red/255, green: green/255, blue: blue/255, alpha: 1.0)
}
func RGB2(red red: CGFloat,green: CGFloat,blue: CGFloat)->UIColor{
    return UIColor(red: red/255, green: green/255, blue: blue/255, alpha: 1.0)
}

func RGB3(red red: CGFloat,green: CGFloat,blue: CGFloat)->UIColor{
    return UIColor(red: red/255, green: green/255, blue: blue/255, alpha: 1.0)
}
func RGB4(red red: CGFloat,green: CGFloat,blue: CGFloat)->UIColor{
    return UIColor(red: red/255, green: green/255, blue: blue/255, alpha: 1.0)
}
func RandomColor()->(UIColor){
    let r = random()%256
    let g = random()%256
    let b = random()%256
    return RGB(red: CGFloat(r), green: CGFloat(g), blue: CGFloat(b))
}
